﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Vowei.Core.Models;

namespace Vowei.Data.Models
{
    public partial class Requirement : Ticket, IRequirement
    {
        public Requirement()
        {
        }

        IQueryable<ITicket> IContainer<ITicket>.Children
        {
            get { return Children.AsQueryable<ITicket>(); }
        }

        public void AddChild(ITicket child)
        {
            Children.Add((Ticket)child);
        }

        public void RemoveChild(ITicket child)
        {
            Children.Remove((Ticket)child);
        }

        public void ClearChildren()
        {
            Children.Clear();
        }

        IMilestone IRequirement.Milestone
        {
            get
            {
                return this.Milestone;
            }
            set
            {
                this.Milestone = (Milestone)value;
            }
        }
    }
}
